﻿/**
 * @file Define.h
 * @brief 基础定义
 * $Id: Define.h 13 2011-01-01 11:48:27Z tonyjobmails $
 * $Date: 2011-01-01 11:48:27 +0000 (Sat, 01 Jan 2011) $
 * $Author: tonyjobmails $
 * $Revision: 13 $
 */
#ifndef __DEFINE__H
#define __DEFINE__H

#include <stdarg.h>
#include <stdio.h>

/**
 * @brief 处理格式化可变参数的宏
 */
#define getMessage(msg, msglen, pat)	\
	do	\
	{	\
		va_list ap;	\
		bzero(msg, msglen);	\
		va_start(ap, pat);	\
		vsnprintf(msg, msglen - 1, pat, ap);	\
		va_end(ap);	\
	}while(false)

#endif	/// __DEFINE__H
 

